package com.loser.excel.core.handler;

import cn.hutool.core.util.ObjectUtil;
import lombok.Data;

import java.util.Date;

/**
 * @author alan
 */
@Data
public class ExcelExportRecordView {

    private String id;

    private String resourceType;

    private String optUser;

    private Date createTime;

    private Date uploadTime;

    private Integer status;

    private String path;

    private String params;

    private String resourceTypeDesc;

    public String getStatusDesc() {
        if (ObjectUtil.isNull(status)) {
            return "异常";
        }
        switch (status) {
            case 1:
                return "进行中";
            case 2:
                return "已中断";
            case 3:
                return "已上传";
            case 4:
                return "异常中断";
            case 5:
                return "已失效";
            default:
                return "异常";
        }
    }

    private String fileName;

    private Boolean showProgressBar;

    private Integer totalCount;

    private Integer finishCount;

}
